# # https://adminlte.io/themes/AdminLTE/pages/examples/login.html
# # https://github.com/ColorlibHQ/gentelella
#
# from flask import Flask, render_template, request
#
# app = Flask(
#     __name__,
#     static_folder='static',
# )
#
# login_list = {
#     '张三': '123456'
# }
#
#
# @app.route("/")
# def index_login():
#     return render_template("1.html")
#
#
# @app.route("/index_register")
# def index_register():
#     return render_template("register.html")
#
#
# login_list = {
#     '张三': 123456
# }
#
#
# @app.route("/login", methods=['POST'])
# def login():
#     name = request.form.get("username")
#     pwd = request.form.get("password")
#     print(name, pwd)
#     if name in login_list.keys():
#         if pwd == login_list[name]:
#             return '登陆成功'
#         else:
#             return '密码错误 <a href="/">返回</a>'
#     else:
#         return '用户不存在 <a href="/">返回</a>'
#
#
# @app.route("/register", methods=['POST'])
# def register():
#     name = request.form.get("username")
#     pwd = request.form.get("password")
#
#     if name in login_list.keys():
#         return '用户已存在 <a href="index_register">返回</a>'
#     else:
#         login_list[name] = pwd
#         return '注册成功 <a href="/">返回登陆</a>'
#
#
# if __name__ == '__main__':
#     app.run(port=5002,debug=True)
